# from django.core.context_processors import csrf
from django.shortcuts import render_to_response
from django.template.context import RequestContext


def index(request, context):
    return render_to_response("index.html", context, context_instance=RequestContext(request))


def index_page(request):
    context = {}

    return index(request, context)


def login_page(request):

    username = request.POST.get("username")

    context = {'username': username}

    if username:
        return index(request, context)
    else:
        print "##### no username!"
        return render_to_response("index.html", context, context_instance=RequestContext(request))